﻿using System.Collections.Generic;
using ConceptsFramework.AbstractConceptElements;

namespace ConceptsFramework.Containers.Global
{
    public class GlobalRelationshipsSingletonContainer
    {
        public RelationshipsGroup RelationshipContainer;

        private static GlobalRelationshipsSingletonContainer _Instance;
        public static GlobalRelationshipsSingletonContainer Instance
        {
            get
            {
                if (_Instance == null)
                    _Instance = new GlobalRelationshipsSingletonContainer();
                return _Instance;
            }
        }

        private GlobalRelationshipsSingletonContainer()
        {
            RelationshipContainer = new RelationshipsGroup();
        }

        public void Add(AbstractRelationship aRelationShip)
        {
            RelationshipContainer.Add(aRelationShip);
        }

        public AbstractRelationship GetRelationship(string strRelationshipKey)
        {
            return RelationshipContainer.GetRelationship(strRelationshipKey);
        }
    }
}
